package com.todo.member.infrastructure.repository;

import com.todo.common.common.entity.response.page.PageResult;
import com.todo.member.common.enums.LevelStatusEnum;
import com.todo.member.infrastructure.entity.condition.MemberLevelInfoCondition;
import com.todo.member.infrastructure.entity.po.MemberLevelInfoPO;

/**
 * @author azhebuxing
 * @date 2025/2/11 11:27
 * @description
 */
public interface MemberLevelInfoRepository {
    /**
     * 插入会员等级信息
     *
     * @param memberLevelInfoPO
     * @return
     */
    Boolean insertMemberLevelInfoPO(MemberLevelInfoPO memberLevelInfoPO);

    /**
     * 更新会员等级信息
     *
     * @param memberLevelInfoPO
     * @return
     */
    Boolean updateMemberLevelInfoPOById(MemberLevelInfoPO memberLevelInfoPO);

    /**
     * 删除会员等级信息
     *
     * @param id
     * @return
     */
    Boolean removeMemberLevelInfoPOById(Long id);

    /**
     * 根据主键查询会员等级信息
     *
     * @param id
     * @return
     */
    MemberLevelInfoPO queryMemberLevelInfoPOById(Long id);

    /**
     * 根据唯一标识查询会员等级信息
     *
     * @param levelCode
     * @return
     */
    MemberLevelInfoPO queryMemberLevelInfoPOByLevelCode(String levelCode);

    /**
     * 根据名称查询会员等级信息
     *
     * @param name
     * @return
     */
    MemberLevelInfoPO queryMemberLevelInfoPOByName(String name);

    /**
     * 根据主键更新会员等级信息状态
     *
     * @param id
     * @param oldStatus
     * @param newStatus
     * @return
     */
    Boolean updateMemberLevelInfoStatusById(Long id, LevelStatusEnum oldStatus, LevelStatusEnum newStatus);

    /**
     * 分页查询会员等级信息
     *
     * @param memberLevelInfoCondition
     * @return
     */
    PageResult<MemberLevelInfoPO> queryMemberLevelInfoPOByPage(MemberLevelInfoCondition memberLevelInfoCondition);

    /**
     * 根据会员等级名称查询会员等级信息
     *
     * @param levelName
     * @return
     */
    MemberLevelInfoPO queryMemberLevelByName(String levelName);
}
